<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

	// Get a db connection.
	$db = JFactory::getDbo();
	 
	// Create a new query object.
	$query = $db->getQuery(true);
	@$uid =  JRequest::getVar('id','');
	if(isset($uid)&&$uid!=0){
		// Select all records from the user profile table where key begins with "custom.".
		// Order it by the ordering field.
		$query->select('google,facebook,twitter,seo_title,seo_meta_keyword,seo_meta_description');
		$query->from('#__user_profiles');
		$query->where('user_id='.$uid);
		// Reset the query using our newly populated query object.
		$db->setQuery($query);
		$results = $db->loadObjectList();
		foreach($results as $row){
			$google 			= $row -> google;
			$facebook 	  	  = $row -> facebook;
			$twitter 		   = $row -> twitter;
			$meta_title 		= $row -> seo_title;
			$meta_keywork 	  = $row -> seo_meta_keyword;
			$meta_description  = $row -> seo_meta_description;
		}
	}
?>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_google" id="jform_follow_google-lbl" aria-invalid="false">Google</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$google;?>" id="jform_follow_google" name="jform[follow][google]" aria-invalid="false">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_facebook" id="jform_follow_facebook-lbl">Facebook</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$facebook;?>" id="jform_follow_facebook" name="jform[follow][facebook]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_twitter" id="jform_follow_twitter-lbl">Twitter</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$twitter;?>" id="jform_follow_twitter" name="jform[follow][twitter]">     </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_meta_title" id="jform_follow_meta_title-lbl">Meta Title</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_title;?>" id="jform_follow_meta_title" name="jform[follow][meta_title]">     </div>
</div>
 <div class="control-group">
      <label title="" class="hasTip control-label" for="jform_follow_meta_keywork" id="jform_follow_meta_keywork-lbl">Meta Keyword</label>      <div class="controls">
      <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_keywork;?>" id="jform_follow_meta_keywork" name="jform[follow][meta_keywork]">      </div>
</div>
<div class="control-group">
     <label title="" class="hasTip control-label" for="jform_follow_meta_desc" id="jform_follow_meta_desc-lbl">Meta Description</label>     <div class="controls">
     <input type="text" size="30" class="input-xlarge" value="<?php echo @$meta_description;?>" id="jform_follow_meta_desc" name="jform[follow][meta_desc]">     </div>
</div>
						            